#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
bool cat[305][305];
void solve()
{
    int n, m, k;
    cin >> n >> m >> k;
    int i = 0;
    int neighbor = 0;
    int x, y;
    for (i = 1; i <= k; i++)
    {
        cin >> x >> y;
        if (x > 1 && cat[x - 1][y] == 1)
            neighbor++;
        if (x < n && cat[x + 1][y] == 1)
            neighbor++;
        if (y < m && cat[x][y + 1] == 1)
            neighbor++;
        if (y > 1 && cat[x][y - 1] == 1)
            neighbor++;
        cat[x][y] = 1;
    }
    cout << 4 * k - neighbor;
}
int main()
{

    solve();
    return 0;
}
